home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 September / PCWorld_2006-09_cd.bin / v cisle / pcw / pcw.exe / pcwAnnoyances.hta next >
Text File  |  2006-07-13  |  10KB  |  305 lines

  1. <HTML>
  2.  <HEAD>
  3.   <TITLE>Skript PC WORLDu: Zm∞na nastavenφ n∞kter²ch funkcφ ve Windows</TITLE>
  4.   <HTA:APPLICATION ID="hta3" 
  5.     APPLICATIONNAME="pcwAnnoyances" 
  6.     BORDER="dialog"
  7.     BORDERSTYLE="complex"
  8.     CAPTION="yes"
  9.     SHOWINTASKBAR="yes"
  10.     SYSMENU="yes"
  11.     INNERBORDER = "no"
  12.     MAXIMIZEBUTTON = "no"
  13.     MINIMIZEBUTTON = "no"
  14.     WINDOWSTATE="normal"
  15.     SINGLEINSTANCE="yes"
  16.     CONTEXTMENU = "no"
  17.     SYSMENU = "no">
  18.    
  19.    <STYLE type="text/css">
  20.    
  21. body {    scrollbar-arrow-color: #000000;
  22.         font-family:Verdana;
  23.         font-style:normal;
  24.         font-size:12;
  25.         background-color:Buttonface}
  26.  
  27. .fading    {font-size:14px;
  28.         background-color:#003159;
  29.         color:white;width:400;
  30.         filter:Alpha(style=1, opacity=90, startx=83, finishx=86)
  31.  
  32.    </STYLE>
  33.    <SCRIPT LANGUAGE=vbscript>
  34.  
  35. '|--------------------------------------------------------------------------------------------------|'
  36.  
  37. Dim myfiles, myshell
  38. ReDim SStArr(0)
  39. Set myfiles = CreateObject("Scripting.FileSystemObject")
  40. Set myshell = CreateObject("Wscript.Shell")
  41. Set c = MyShell.Environment("PROCESS")
  42.     Tempdir=c("Temp")
  43.     Windir=c("Systemroot")
  44. ExpAdv = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\"
  45.  
  46. '|--------------------------------------------------------------------------------------------------|'
  47.  
  48. Sub SubInitFenster
  49.     on error resume next
  50.     window.resizeTo 500, 330
  51.     Ext = Myshell.regread(ExpAdv & "HideFileExt") 'Dword -> 0, 1
  52.     if Ext = "" then 
  53.         Ext = 1
  54.         myshell.regwrite ExpAdv & "HideFileExt", Ext, "REG_DWORD"
  55.     end if
  56.     if Ext = 0 then
  57.         document.all.Item("O1").Checked = True
  58.     else
  59.         document.all.Item("O1").Checked = False
  60.     end if
  61.     
  62.     Hid = Myshell.regread(ExpAdv & "Hidden") 'Dword -> 1, 2
  63.     if Hid = "" then 
  64.         Hid = 2
  65.         myshell.regwrite ExpAdv & "Hidden", Hid, "REG_DWORD"
  66.     end if
  67.     if Hid = 1 then
  68.         document.all.Item("O2").Checked = True
  69.     else
  70.         document.all.Item("O2").Checked = False
  71.     end if
  72.     
  73.     sHid = Myshell.regread(ExpAdv & "ShowSuperHidden") 'Dword -> 1, 0
  74.     if sHid = "" then 
  75.         sHid = 0
  76.         myshell.regwrite ExpAdv & "ShowSuperHidden", sHid, "REG_DWORD"
  77.     end if
  78.     if sHid = 1 then
  79.         document.all.Item("O4").Checked = True
  80.     else
  81.         document.all.Item("O4").Checked = False
  82.     end if
  83.     
  84.     SysO = Myshell.regread(ExpAdv & "WebViewBarricade") 'Dword -> 1, 0
  85.     If SysO = "" then 
  86.         SysO = 0
  87.         myshell.regwrite ExpAdv & "WebViewBarricade", SysO, "REG_DWORD"
  88.     end if
  89.     if SysO = 1 then
  90.         document.all.Item("O5").Checked = True
  91.     else
  92.         document.all.Item("O5").Checked = False
  93.     end if
  94.     
  95.     ksea = Myshell.regread("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState\Use Search Asst") 'Zeichenfolge -> no, yes
  96.     if ksea = "" then 
  97.         ksea = "yes"
  98.         myshell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState\Use Search Asst", ksea, "REG_SZ"
  99.     end if
  100.     if ksea = "no" then
  101.         document.all.Item("O3").Checked = True
  102.     else
  103.         document.all.Item("O3").Checked = False
  104.     end if
  105.     
  106.     Ball = Myshell.regread(ExpAdv & "EnableBalloonTips") 'Dword -> 0, 1
  107.     if Ball = "" then 
  108.         Ball = 1
  109.         myshell.regwrite ExpAdv & "EnableBalloonTips", Ball, "REG_DWORD"
  110.     end if
  111.     if Ball = 0 then
  112.         document.all.Item("O6").Checked = True
  113.     else
  114.         document.all.Item("O6").Checked = False
  115.     end if
  116.     
  117.     Pers = Myshell.regread(ExpAdv & "IntelliMenus") 'Dword -> 0, 1
  118.     if Pers = "" then 
  119.         Pers = 1
  120.         myshell.regwrite ExpAdv & "IntelliMenus", Pers, "REG_DWORD"
  121.     end if
  122.     if Pers = 0 then
  123.         document.all.Item("O7").Checked = True
  124.     else
  125.         document.all.Item("O7").Checked = False
  126.     end if
  127.     
  128.     SSt = Myshell.regread("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellState") 'Bin 
  129.     for n = 0  to ubound(SSt)
  130.         ReDim Preserve SStArr(n)
  131.         hWert = Hex(SSt(n))
  132.         if len(hWert) = 1 then
  133.             SStArr(n) = "0" & hWert
  134.         else
  135.             SStArr(n) = hWert
  136.         end if
  137.     next
  138.     'Klassisch Start 00 - Neu Start 02
  139.     if SStArr(32) = "00" then 
  140.         document.all.Item("O8").Checked = True
  141.     else
  142.         document.all.Item("O8").Checked = False
  143.     end if
  144.     
  145.     Allg = Myshell.regread(ExpAdv & "WebView") 'Dword -> 0, 1
  146.     if Allg = "" then 
  147.         Allg = 0
  148.         myshell.regwrite ExpAdv & "WebView", Allg, "REG_DWORD"
  149.     end if
  150.     if Allg = 0 then
  151.         document.all.Item("O10").Checked = True
  152.     else
  153.         document.all.Item("O10").Checked = False
  154.     end if    
  155.     
  156.     kLog = MyShell.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LogonType") 'Dword 0, 1
  157.     if kLog = 0 then
  158.         document.all.Item("O9").Checked = True
  159.     else
  160.         document.all.Item("O9").Checked = False
  161.     end if
  162.     
  163.     kDesk = MyShell.regread("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager\ThemeActive") 'Zeichenfolge 0, 1
  164.     if kDesk = 0 then
  165.         document.all.Item("O11").Checked = True
  166.     else
  167.         document.all.Item("O11").Checked = False
  168.     end if
  169. End Sub
  170.  
  171. '|--------------------------------------------------------------------------------------------------|'
  172.  
  173. Sub SubSet
  174.     if document.all.Item("O1").Checked then
  175.         Ext = 0
  176.     else
  177.         Ext = 1
  178.     end if
  179.     myshell.regwrite ExpAdv & "HideFileExt", Ext, "REG_DWORD"
  180.     
  181.     if document.all.Item("O2").Checked then
  182.         Hid = 1
  183.     else
  184.         Hid = 2
  185.     end if
  186.     myshell.regwrite ExpAdv & "Hidden", Hid, "REG_DWORD"
  187.     
  188.     if document.all.Item("O3").Checked then
  189.         ksea = "no"
  190.     else
  191.         ksea = "yes"
  192.     end if
  193.     myshell.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState\Use Search Asst", ksea, "REG_SZ"
  194.     
  195.     if document.all.Item("O4").Checked then
  196.         sHid = 1
  197.     else
  198.         sHid = 0
  199.     end if
  200.     myshell.regwrite ExpAdv & "ShowSuperHidden", sHid, "REG_DWORD"
  201.     
  202.     if document.all.Item("O5").Checked then
  203.         SysO = 1
  204.     else
  205.         SysO = 0
  206.     end if
  207.     myshell.regwrite ExpAdv & "WebViewBarricade", SysO, "REG_DWORD"
  208.     
  209.     if document.all.Item("O6").Checked then
  210.         Ball = 0
  211.     else
  212.         Ball = 1
  213.     end if
  214.     myshell.regwrite ExpAdv & "EnableBalloonTips", Ball, "REG_DWORD"
  215.     
  216.     if document.all.Item("O7").Checked then
  217.         Pers = 0
  218.     else
  219.         Pers = 1
  220.     end if
  221.     myshell.regwrite ExpAdv & "IntelliMenus", Pers, "REG_DWORD"
  222.     
  223.     if document.all.Item("O8").Checked then
  224.         SStArr(32) = "00"
  225.     else
  226.         SStArr(32) = "02"
  227.     end if
  228.     Set FWrite = Myfiles.OpentextFile(Tempdir & "\" & "ShellState.reg", 2, True)
  229.     FWrite.Writeline "REGEDIT4"
  230.     FWrite.Writeline VBCR
  231.     FWrite.Writeline "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]"
  232.     FWrite.Write Chr(34) & "ShellState" & chr(34) & "=hex:"
  233.     for n = 0 to Ubound(SStArr)-1
  234.         FWrite.Write SStArr(n) & ","                    
  235.     next
  236.     FWrite.Write SStArr(Ubound(SStArr))
  237.     Fwrite.Close
  238.     ret = Myshell.Run("regedit /s " & Tempdir & "\" & "ShellState.reg", 0, True)
  239.     ret = MyFiles.DeleteFile(Tempdir & "\" & "ShellState.reg", true)
  240.     
  241.     if document.all.Item("O9").Checked then
  242.         kLog = 0
  243.         Mult = 0
  244.     else
  245.         kLog = 1
  246.         Mult = 1
  247.     end if
  248.     myshell.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LogonType", kLog, "REG_DWORD"
  249.     myshell.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AllowMultipleTSSessions", Mult, "REG_DWORD"    
  250.     
  251.     if document.all.Item("O10").Checked then
  252.         Allg = 0
  253.     else
  254.         Allg = 1
  255.     end if
  256.     myshell.regwrite ExpAdv & "WebView", Allg, "REG_DWORD"
  257.     
  258.     if document.all.Item("O11").Checked then
  259.         ret = myshell.run(chr(34) & windir & "\Resources\Themes\Windows Classic.theme" & chr(34), 1, True)
  260.     else
  261.         ret = myshell.run(windir & "\resources\Themes\Luna.theme", 1, True)
  262.     end if
  263.     
  264.     set wmi = GetObject("winmgmts:")
  265.     Prozesse = "select * from win32_process where name='explorer.exe'"
  266.     set Task = wmi.ExecQuery(Prozesse)
  267.     for each Prozess in Task
  268.           Prozess.Terminate 0
  269.     next
  270.     ret = myshell.run("Explorer.exe", 1, False)
  271.  
  272. End Sub
  273.  
  274. '|--------------------------------------------------------------------------------------------------|'
  275.  
  276. Sub SubQuit
  277.     Set myshell = Nothing
  278.     Set myFiles = Nothing
  279.     Set Appshell = Nothing
  280.     Window.Close
  281. End Sub
  282.  
  283. '|--------------------------------------------------------------------------------------------------|'
  284.  
  285. </SCRIPT>
  286.   </HEAD>
  287.     <BODY onload="SubInitFenster" scroll="yes">
  288.    <INPUT Type=checkbox name="O1" Title=Znam"> Zobrazit p°φpony i u soubor∙ znßm²ch typ∙<br>
  289.    <INPUT Type=checkbox name="O2" Title=Hidden"> Zobrazit skrytΘ soubory a slo₧ky<br>
  290.    <INPUT Type=checkbox name="O3" Title=kSearch"> Povolit klasick² vzhled pro vyhledßvßnφ na poΦφtaΦi<br>
  291.    <INPUT Type=checkbox name="O4" Title=Superhidden"> Zobrazit systΘmovΘ soubory<br>
  292.    <INPUT Type=checkbox name="O5" Title=Sysfold"> Zobrazit obsah systΘmov²ch slo₧ek<br>
  293.    <INPUT Type=checkbox name="O6" Title=Balloon"> ZruÜenφ zobrazovßnφ informaΦnφch bublin<br>
  294.    <INPUT Type=checkbox name="O7" Title=Perso"> Vypnutφ individußlnφch nabφdek<br>
  295.    <INPUT Type=checkbox name="O8" Title=kStart"> Povolenφ klasickΘ nabφdky Start<br>
  296.    <INPUT Type=checkbox name="O9" Title=kLogon"> Povolenφ klasickΘho dialogu pro p°ihlßÜenφ<br>
  297.    <INPUT Type=checkbox name="O10" Title=Obec"> ZruÜenφ zobrazenφ panelu Prßce se soubory a slo₧kou ve slo₧kßch<br>
  298.    <INPUT Type=checkbox name="O11" Title=kDesktop"> Povolenφ klasickΘho vzhledu pracovnφ plochy<br><br>
  299.    
  300.    <INPUT Type=button value="Nastavit" name=button1 size=52 onClick="SubSet">
  301.    <INPUT Type=button value="Aktualizovat" name=button3 size=52 onClick="SubInitFenster">
  302.    <INPUT Type=button value="Konec" name=button2 size=32 onClick="SubQuit">
  303.      
  304.  </BODY>
  305. </HTML>